package com.wn.ziroombackend.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wn.ziroombackend.entity.Quarters;
import com.wn.ziroombackend.mapper.QuartersMapper;
import com.wn.ziroombackend.service.QuartersService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-27 10:56:29
 */
@Service
public class QuartersServiceImpl extends ServiceImpl<QuartersMapper, Quarters> implements QuartersService {

    @Autowired
    private QuartersMapper quartersMapper;

    @Override
    public PageInfo<Quarters> getList(Integer num, Integer size, String name) {
        PageHelper.startPage(num, size);
        List<Quarters> quartersList = quartersMapper.selectByPage(name);

        return new PageInfo<Quarters>(quartersList);

    }
}
